﻿@namespace Masa.Blazor
@typeparam TItem
@typeparam TItemValue
@typeparam TValue
@inherits MSelect<TItem, TItemValue, TValue>
@using Masa.Blazor.Components.Cascader

@((RenderFragment)base.BuildRenderTree)

@code {

    protected override RenderFragment GenSelectList() => __builder =>
    {
        <CascadingValue Value="this" TValue="ICascader<TItem, TItemValue>" IsFixed>
            <div class="@_block.Element("columns")">
                <MCascaderColumn Dense="@Dense"
                                 Items="@Items"
                                 ItemValue="@ItemValue"
                                 SelectedItems="@_selectedItems"
                                 ItemText="@ItemText"
                                 LoadChildren="@LoadChildren"
                                 ItemChildren="@ItemChildren"
                                 TItem="@TItem"
                                 TValue="@TItemValue"
                                 OnSelect="@HandleOnSelect">
                </MCascaderColumn>
            </div>
        </CascadingValue>
    };

}